<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">


<script type="text/javascript">

    function doAuthenticate() {
        if(document.getElementById("j_username").value==""){
            alert("The user name cannot be empty.");
            return false;
        }
        else if(document.getElementById("j_password").value=="") {
            alert("The password cannot be empty.");
            return false;
        }
        document.getElementById("frmLogin").todo.value = "doauthenticate";
        return true;
    }

            

</script>



<form name ="frmLogin" id ="frmLogin" onsubmit="return doAuthenticate()" action='/assignmentCinema/' method='POST'>
    <%
                if (request.getAttribute("msg") != null) {
    %>
    <fieldset>
        <%

                                                                    out.println(request.getAttribute("msg"));
        %>
    </fieldset>
    <%                 }
    %>

    <fieldset>
        <input type="hidden" name="todo" id="todo" value="" />
        <label for="login-text">Username</label>
        <input type="text" name='j_username' id='j_username' />
        <label for="login-text">Password</label>
        <input type="password" name='j_password' id='j_password'/>
    </fieldset>

    <input type="submit" name="btnsubmit" value="Login" />

</form>

